﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MedicalManagementAPP.AccountModule
{
    public class Person
    {
        // 以下三个属性禁止从外界的修改
        public string PName { get; private set; }
        /// <summary>
        /// PType可能是："Patient" "Worker" "Admin"
        /// </summary>
        public string PType { get; private set; }
        public string PId { get; private set; }
        public Person(string name, string type, string id)
        {
            PName = name;
            PType = type;
            PId = id;
        }
        override public string ToString()
        {
            return PType + " ID:" + PId + " 姓名:" + PName;
        }

        public void Update(string name,string type)
        {
            this.PName = name;
            this.PType = type;
        }
    }
}
